class HButton
{
  
  int swidth, sheight;    
  int xpos, ypos;         
  int r,g,b=0;  

  HButton (int xp, int yp, int sw, int sh) {
    swidth = sw;
    sheight = sh;
    xpos = xp;
    ypos = yp;
  }
  
  boolean setColor(int cr, int cg, int cb){
    boolean bHasChanged = r!=cr || g!=cg || b!=cb;
    r = cr;
    g = cg;
    b = cb;
    return bHasChanged;
  }

  int getR() {return r;}
  int getG() {return g;}
  int getB() {return b;}  

  void display() {
    fill(r,g,b*2);          
    rect(xpos,ypos,swidth,sheight);      
  }
  
}
